<!--
 * createor: zc
 * email: zc8023zs@163.com
 * create_time: 2020/3/14 13:46:24
 *-->
<template>
  <el-container>
    <el-header>
      商户/门店详情
    </el-header>
    <el-main>
      <el-form label-width="200px" :inline="true" style="padding:5% 5% 0 5%">
        <el-form-item label="标识id：">
          <span>{{formData.shop_id}}</span>
        </el-form-item>
        <el-form-item label="运营中心id：">
          <span>{{formData.oc_id}}</span>
        </el-form-item>
        <el-form-item label="管理模式：">
          <span>{{formData.shop_mode}}</span>
        </el-form-item>
        <el-form-item label="店铺号：">
          <span>{{formData.shop_number}}</span>
        </el-form-item>
        <el-form-item label="名称：">
          <span>{{formData.shop_name}}</span>
        </el-form-item>
        <el-form-item label="类型：">
          <span>{{formData.shop_type}}</span>
        </el-form-item>
        <el-form-item label="营业状态：">
          <span>{{formData.shop_status}}</span>
        </el-form-item>
        <el-form-item label="营业时间类型：">
          <span>{{formData.shop_time_type}}</span>
        </el-form-item>
        <el-form-item label="经度：">
          <span>{{formData.lng}}</span>
        </el-form-item>
        <el-form-item label="纬度：">
          <span>{{formData.lat}}</span>
        </el-form-item>
        <el-form-item label="联系电话：">
          <span>{{formData.shop_tel}}</span>
        </el-form-item>
        <el-form-item label="店铺地址：">
          <span>{{formData.shop_address}}</span>
        </el-form-item>
        <el-form-item label="店铺logo：">
          <span>{{formData.logo}}</span>
        </el-form-item>
        <el-form-item label="自动接单：">
          <span>{{formData.auto_get}}</span>
        </el-form-item>
        <el-form-item label="配送支持(位运算)：">
          <span>{{formData.delivery_type}}</span>
        </el-form-item>
        <el-form-item label="自提模式(位运算)：">
          <span>{{formData.delivery2}}</span>
        </el-form-item>
        <el-form-item label="接受预定：">
          <span>{{formData.reserve}}</span>
        </el-form-item>
        <el-form-item label="预约最大天数：">
          <span>{{formData.reserve_max_day}}</span>
        </el-form-item>
        <el-form-item label="预定开始时间：">
          <span>{{formData.reserve_begin_time}}</span>
        </el-form-item>
        <el-form-item label="预定结束时间：">
          <span>{{formData.reserve_end_time}}</span>
        </el-form-item>
        <el-form-item label="门店配图 多图英文逗号分隔：">
          <span>{{formData.imgs}}</span>
        </el-form-item>
        <el-form-item label="店铺公告：">
          <span>{{formData.notice}}</span>
        </el-form-item>
        <el-form-item label="人均消费：">
          <span>{{formData.per_cost}}</span>
        </el-form-item>
        <el-form-item label="起送：">
          <span>{{formData.send_out_up}}</span>
        </el-form-item>
        <el-form-item label="天气情况：">
          <span>{{formData.heavy_weather}}</span>
        </el-form-item>
        <el-form-item label="配送时长：">
          <span>{{formData.delivery_time_usual}}</span>
        </el-form-item>
        <el-form-item label="配送时长：">
          <span>{{formData.delivery_time_special}}</span>
        </el-form-item>
        <el-form-item label="配送费：">
          <span>{{formData.delivery_cost_usual}}</span>
        </el-form-item>
        <el-form-item label="配送费：">
          <span>{{formData.delivery_cost_special}}</span>
        </el-form-item>
        <el-form-item label="配送费减免：">
          <span>{{formData.delivery_cost_off}}</span>
        </el-form-item>
        <el-form-item label="创建时间：">
          <span>{{formData.create_time}}</span>
        </el-form-item>
        <el-form-item label="主营业务分类：">
          <span>{{formData.class_main}}</span>
        </el-form-item>
        <el-form-item label="主营业务分类,$分隔：">
          <span>{{formData.class_main_value}}</span>
        </el-form-item>
        <el-form-item label="次营业务分类：">
          <span>{{formData.class_minor}}</span>
        </el-form-item>
        <el-form-item label="次营业务分类,$分隔：">
          <span>{{formData.class_minor_value}}</span>
        </el-form-item>
        <el-form-item label="门店关联商户：">
          <span>{{formData.parent_id}}</span>
        </el-form-item>
        <el-form-item label="店铺评分：">
          <span>{{formData.rpt_score}}</span>
        </el-form-item>
        <el-form-item label="近30天销量：">
          <span>{{formData.rpt_month_sale}}</span>
        </el-form-item>
        <el-form-item label="点赞数：">
          <span>{{formData.rpt_like}}</span>
        </el-form-item>
        <el-form-item label="收藏数：">
          <span>{{formData.rpt_favorite}}</span>
        </el-form-item>
        <el-form-item label="待结算：">
          <span>{{formData.amount_temp}}</span>
        </el-form-item>
        <el-form-item label="余额：">
          <span>{{formData.amount}}</span>
        </el-form-item>
        <el-form-item label="提现冻结：">
          <span>{{formData.amount_freeze}}</span>
        </el-form-item>
        <el-form-item label="提现汇总：">
          <span>{{formData.amount_extraction}}</span>
        </el-form-item>
        <el-form-item label="评论数：">
          <span>{{formData.rpt_comment}}</span>
        </el-form-item>
        <el-form-item label="数据版本字段：">
          <span>{{formData.version_id}}</span>
        </el-form-item>
      </el-form>
    </el-main>
  </el-container>
</template>
<style scoped>
body .app-container .el-container,
body .app-container .el-header,
body .app-container .el-main,
body .el-container,
body .el-header,
body .el-main {
  padding: 0;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
}
</style>
<script>
import { Loading } from "element-ui";
import {
  qr_shopInfo
} from '@/api/project/wmyw/project_wmyw_qr_shop'
export default {
  name: "a_wmywa_qr_shop_info",
  data() {
    return {
      infoLoading: false,
      formData:{
        shop_id: 0, 
        oc_id: 0, 
        shop_mode: 0, 
        shop_number: 0, 
        shop_name: '', 
        shop_type: 0, 
        shop_status: 0, 
        shop_time_type: 0, 
        lng: '', 
        lat: '', 
        shop_tel: '', 
        shop_address: '', 
        logo: '', 
        auto_get: 0, 
        delivery_type: 0, 
        delivery2: 0, 
        reserve: 0, 
        reserve_max_day: 0, 
        reserve_begin_time: '2020/8/11 15:00:33', 
        reserve_end_time: '2020/8/11 15:00:33', 
        imgs: '', 
        notice: '', 
        per_cost: '', 
        send_out_up: 0.0, 
        heavy_weather: 0, 
        delivery_time_usual: 0, 
        delivery_time_special: 0, 
        delivery_cost_usual: 0.0, 
        delivery_cost_special: 0.0, 
        delivery_cost_off: 0.0, 
        create_time: '2020/8/11 15:00:33', 
        class_main: 0, 
        class_main_value: '', 
        class_minor: 0, 
        class_minor_value: '', 
        parent_id: 0, 
        rpt_score: 0.0, 
        rpt_month_sale: 0, 
        rpt_like: 0, 
        rpt_favorite: 0, 
        amount_temp: 0.0, 
        amount: 0.0, 
        amount_freeze: 0.0, 
        amount_extraction: 0.0, 
        rpt_comment: 0, 
        version_id: 0, 
      }
    };
  },
  activated() {
    var result = location.search.match(new RegExp("[\?\&]id=([^\&]+)", "i"));
    if(result != null || result.length > 0){
      this.onInfo(result[1]);
    }
  },
  methods: {
    onInfo(id){
      this.infoLoading=true;
      qr_shopInfo({id:id}).then(r=>{
        this.formData.shop_id = r.dataSingle.shop_id, 
        this.formData.oc_id = r.dataSingle.oc_id, 
        this.formData.shop_mode = r.dataSingle.shop_mode, 
        this.formData.shop_number = r.dataSingle.shop_number, 
        this.formData.shop_name = r.dataSingle.shop_name, 
        this.formData.shop_type = r.dataSingle.shop_type, 
        this.formData.shop_status = r.dataSingle.shop_status, 
        this.formData.shop_time_type = r.dataSingle.shop_time_type, 
        this.formData.lng = r.dataSingle.lng, 
        this.formData.lat = r.dataSingle.lat, 
        this.formData.shop_tel = r.dataSingle.shop_tel, 
        this.formData.shop_address = r.dataSingle.shop_address, 
        this.formData.logo = r.dataSingle.logo, 
        this.formData.auto_get = r.dataSingle.auto_get, 
        this.formData.delivery_type = r.dataSingle.delivery_type, 
        this.formData.delivery2 = r.dataSingle.delivery2, 
        this.formData.reserve = r.dataSingle.reserve, 
        this.formData.reserve_max_day = r.dataSingle.reserve_max_day, 
        this.formData.reserve_begin_time = r.dataSingle.reserve_begin_time, 
        this.formData.reserve_end_time = r.dataSingle.reserve_end_time, 
        this.formData.imgs = r.dataSingle.imgs, 
        this.formData.notice = r.dataSingle.notice, 
        this.formData.per_cost = r.dataSingle.per_cost, 
        this.formData.send_out_up = r.dataSingle.send_out_up, 
        this.formData.heavy_weather = r.dataSingle.heavy_weather, 
        this.formData.delivery_time_usual = r.dataSingle.delivery_time_usual, 
        this.formData.delivery_time_special = r.dataSingle.delivery_time_special, 
        this.formData.delivery_cost_usual = r.dataSingle.delivery_cost_usual, 
        this.formData.delivery_cost_special = r.dataSingle.delivery_cost_special, 
        this.formData.delivery_cost_off = r.dataSingle.delivery_cost_off, 
        this.formData.create_time = r.dataSingle.create_time, 
        this.formData.class_main = r.dataSingle.class_main, 
        this.formData.class_main_value = r.dataSingle.class_main_value, 
        this.formData.class_minor = r.dataSingle.class_minor, 
        this.formData.class_minor_value = r.dataSingle.class_minor_value, 
        this.formData.parent_id = r.dataSingle.parent_id, 
        this.formData.rpt_score = r.dataSingle.rpt_score, 
        this.formData.rpt_month_sale = r.dataSingle.rpt_month_sale, 
        this.formData.rpt_like = r.dataSingle.rpt_like, 
        this.formData.rpt_favorite = r.dataSingle.rpt_favorite, 
        this.formData.amount_temp = r.dataSingle.amount_temp, 
        this.formData.amount = r.dataSingle.amount, 
        this.formData.amount_freeze = r.dataSingle.amount_freeze, 
        this.formData.amount_extraction = r.dataSingle.amount_extraction, 
        this.formData.rpt_comment = r.dataSingle.rpt_comment, 
        this.formData.version_id = r.dataSingle.version_id, 
        this.infoLoading=false;
      }).catch(()=>{
        this.infoLoading=false;
      });
    }
  }
}
</script>
